From 029467b7632869a75f565360dd9d726c603b72a4 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 7 Apr 2011 23:35:20 -0500 Subject: [PATCH] Adjust emacsVER-common.README to accomodate new patch headers. Add debian/patch-to-news to handle converting new git-dpm style patch headers to emacsVER-common.README. --- debian/patch-to-news | 23 +++++++++++++++++++++++ debian/rules | 10 +++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 debian/patch-to-news diff --git a/debian/patch-to-news b/debian/patch-to-news new file mode 100755 index 00000000000..309fec34966 --- /dev/null +++ b/debian/patch-to-news @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +patch="$1" + +sed ' + # delete everything after the first line starting with "--- " (the diff) + /^--- [^ ]/,$d' < "$patch" \ +| tac \ +| sed ' + # delete everything up to the first line containing only "---" (the diffstat) + 1,/^---$/d' \ +| tac \ +| sed ' + # delete everything before the first blank line (git summary line) + 1,/^$/d' \ +| sed ' + # convert to our README.Debian NEWS format + 1 s/^/* / + 2,$ s/^/ /' + +echo " Patch: $(basename $patch)" diff --git a/debian/rules b/debian/rules index 9b8337d461c..6e2639689d5 100755 --- a/debian/rules +++ b/debian/rules @@ -413,13 +413,17 @@ debian/$(flavor)-lucid.%: debian/emacsVER.% debian/changelog $(call deb_sub,$<,$@) debian/$(flavor)-common.README.Debian: \ - debian/emacsVER-common.README debian/patches/*.diff debian/patches/series + debian/emacsVER-common.README debian/patches/*.patch debian/patches/series \ + debian/rules debian/patch-to-news cd debian && \ csplit -s -f emacsVER-common.README. \ emacsVER-common.README '/@@PATCH_LIST_HERE@@/' cp debian/emacsVER-common.README.00 debian/emacsVER-common.README.tmp - for p in $$($(quilt) series); do $(quilt) header $$p; done \ - >> debian/emacsVER-common.README.tmp + for p in $$($(quilt) series); do \ + debian/patch-to-news debian/patches/$$p \ + >> debian/emacsVER-common.README.tmp; \ + echo >> debian/emacsVER-common.README.tmp; \ + done tail -n +2 \ < debian/emacsVER-common.README.01 \ >> debian/emacsVER-common.README.tmp -- 2.30.2